Page({
  onShareAppMessage() {
    return {
      title: '轩铭2512的个人名片小程序。',
      imageUrl: '../../image/fxfm.png'
    }
  },
  tp(e) {
    var url = e.currentTarget.dataset.url
    wx.previewImage({
      urls: [url]
    })
  },
  copy(e) {
    var content = e.currentTarget.dataset.content
    if (wx.getStorageSync('qxsetting').xrjtb != true) {
      wx.showModal({
        title: '提示',
        content: '“写入数据到剪贴板”权限未开启，无法使用此功能。如需使用此功能，请点击“确定”进入权限管理页面开启“写入数据到剪贴板”权限。',
        success(res) {
          if (res.confirm) {
            wx.navigateTo({
              url: '../qxgl/qxgl'
            })
          }
        }
      })
      return
    }
    wx.setClipboardData({
      data: content
    })
  },
  lj(e) {
    var url = e.currentTarget.dataset.url
    this.pageRouter.navigateTo({
      url: '../lj/lj?id=' + encodeURIComponent(url)
    })
  },
  product(e) {
    var product = e.currentTarget.dataset.product
    this.pageRouter.navigateTo({
      url: '../lj/lj?id=' + encodeURIComponent('https://www.zhangls2512.cn/product/' + product)
    })
  },
  wxxcx(e) {
    var appid = e.currentTarget.dataset.appid
    wx.navigateToMiniProgram({
      appId: appid
    })
  },
  wxgzh() {
    wx.openOfficialAccountProfile({
      username: 'xm2512vlog'
    })
  },
  wxsph() {
    wx.openChannelsUserProfile({
      finderUserName: 'sphYzyUF0m3ZRJ4'
    })
  },
  search() {
    this.router.navigateTo({
      url: '../search/search'
    })
  }
})